<?php
namespace app\web\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class ViperIntegral extends Validate
{
    //定义验证规则
    protected $rule = [
        'name'  => 'require',
        'integral'  => 'require',
        'money'  => 'require',
        'vip_type_id'=>'require',
    ];
    //定义验证提示
    protected $message = [
        'name.require' => '请输入名称',
        'integral.require' => '请输入使用积分',
        'money.require' => '请填写兑换金额',
        'vip_type_id.require' => '请选择会员卡类型',
    ];

    //定义验证场景
    protected $scene = [
        'add'   =>  ['name','integral','money','vip_type_id'],
    ];

}
